<?php
	class Rand {
		var $socket;
		var $expl;
		function __construct($socket, $expl, $string) {
			$this->socket = $socket;
			if (preg_match('/,/', $string)) {
				$string = str_replace(' ', '', $string);
			}else{
				IRCBot::enviar_dat('PRIVMSG', trim($expl[2])." :Invalido!\r\n");
				$this->err = true;
			}
			
			if ($this->err == false) {
				$string = explode(',', $string);
				
				$res = $string[rand(0,count($string)-1)];
				IRCBot::enviar_dat('PRIVMSG', trim($expl[2])." :".trim($res)."\r\n");
			}
			$this->err = true;
		}
	}
?>